import request from '@/config/axios'

// ai云盘-文件夹 VO
export interface WebDiskDirVO {
  id?: string // id
  name?: string // 文件夹
  spaceId: string // 空间id
  pid?:string,
  createTime?:Date,
}

// ai云盘-文件夹 API
export const WebDiskDirApi = {
  // 查询ai云盘-文件夹分页
  getWebDiskDirPage: async (params: any) => {
    return await request.get({ url: `/ai/web-disk-dir/page`, params })
  },

  // 查询ai云盘-文件夹详情
  getWebDiskDir: async (id: number) => {
    return await request.get({ url: `/ai/web-disk-dir/get?id=` + id })
  },

  // 新增ai云盘-文件夹
  createWebDiskDir: async (data: WebDiskDirVO) => {
    return await request.post({ url: `/ai/web-disk-dir/create`, data })
  },

  // 修改ai云盘-文件夹
  updateWebDiskDir: async (data: WebDiskDirVO) => {
    return await request.put({ url: `/ai/web-disk-dir/update`, data })
  },

  // 删除ai云盘-文件夹
  deleteWebDiskDir: async (id: number) => {
    return await request.delete({ url: `/ai/web-disk-dir/delete?id=` + id })
  },

  // 导出ai云盘-文件夹 Excel
  exportWebDiskDir: async (params) => {
    return await request.download({ url: `/ai/web-disk-dir/export-excel`, params })
  },
  simpleList:async (params) => {
    return await request.get({ url: `/ai/web-disk-dir/simple-list`, params })
  }
}
